package com.jic.product.service;

import com.github.pagehelper.PageInfo;
import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.product.manage.request.ShopInfoRequest;
import com.jic.product.manage.response.ShopInfoResponse;
import com.jic.product.model.entity.MProduct;
import com.jic.product.model.vo.response.MProductTypeResponse;

import java.util.List;

/*
 * @Classname 田雨
 * @Description TODO
 * @Created by 22720
 * 业务层
 */


public interface MProductService {

    /*
      保存接口
     */
    int save(MProduct request) ;

    /*
      保存或修改接口
     */
    int saveOrUpdate(MProduct request) ;

    /*
      删除接口
     */
    int deleteByPrimaryKey(MProduct request) ;

    /*
      删除接口
     */
    int deleteByPrimaryKeyLogically(MProduct request) ;

    /*
      修改
     */
    int updateByPrimaryKeySelective(MProduct request) ;

    /*
      详情
     */
    MProduct getByPrimaryKey(MProduct request);

    /*
      分页查询
     */
    PageInfo<MProduct> listPageBySelective(MProduct request,int pageNum, int pageSize);

    /*
         分页查询
        */
    PageInfo<MProduct> listPageX(MProduct request,int pageNum, int pageSize);
    /*
      分页查询
     */
    PageInfo<MProduct> listPageS(MProduct request,int pageNum, int pageSize);

    /*
     * 不分页查询
     */
    List<MProduct> listAllRecord(MProduct request);

    /**
     * 查询 [商品表]包含的商品类型
     * @return
     */
    RestResult<List<MProductTypeResponse>> queryProductType();

    /*修改为下架*/
    int updateA(MProduct param);

    /* 修改为上架*/
    int updateB(MProduct param);

    /*修改协议上浮*/
    int updateListA(MProduct param);

    /*查询下架商品*/
    int updateListB(MProduct param);

    /**
     * 查询前十的商品
     * @param request
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<MProduct> topTenProductQuery(MProduct request,int pageNum, int pageSize);
    PageInfo<ShopInfoResponse> listPointsProduct(ShopInfoRequest shopInfoResponse, int pageNum, int pageSize);
}
